<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tag" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<tag:head title="图书评价" ctx="${ctx}">
	<link href="${ctx}/assets/css/staff/staff_book_evaluate/staff_book_evaluate.css" rel="stylesheet">
</tag:head>
<tag:body>
	<!-- 左 上 导航 -->
	<tag:nav ctx="${ctx}"></tag:nav>

	<!-- page content -->
	<tag:content title="评价图书">
		<div class="form-group col-sm-12">
			<div class="col-sm-6">
				<img id="preview" src="${ctx}/${requestScope.book.bookImage}" width="180px" height="180px" />
			</div>
		</div>
		<div class="form-group col-sm-12" style="display:none;">
			<label class="control-label col-sm-2">Id:</label>
			<div class="col-sm-4">
				<p id="bookId">${requestScope.book.bookId}</p>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<label class="control-label col-sm-2">书名:</label>
			<div class="col-sm-4">
				<p id="bookName">${requestScope.book.name}</p>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<label class="control-label col-sm-2">作者:</label>
			<div class="col-sm-4">
				<p>${requestScope.book.author}</p>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<label class="control-label col-sm-2">分数:</label>
			<div class="col-sm-5">
				<c:if test="${requestScope.book.grade != null}">
					<c:forEach begin="1" end="${requestScope.book.grade}">
						<i class="fa fa-star"></i>
					</c:forEach>
					${requestScope.book.grade}分
				</c:if>
				<c:if test="${requestScope.book.grade == null}">暂无评分</c:if>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<label class="control-label col-sm-2">类别:</label>
			<div class="col-sm-5">
				<p>${requestScope.book.bookClass.name}</p>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<label class="control-label col-sm-2">出版社:</label>
			<div class="col-sm-5">
				<p>${requestScope.book.publish}</p>
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-4">
				<button id="save" type="button" class="btn btn-warning" data-toggle='modal' data-target='.bs-example-modal-eb'>评价</button>
				<button type="button" class="btn btn-info">返回</button>
			</div>
		</div>
		<div class="clearfix"></div>
	</tag:content>
	<!-- page content -->

	<!-- footer content -->
	<tag:footer></tag:footer>

</tag:body>
<tag:javascript ctx="${ctx}">
	<script src="${ctx}/assets/js/staff/staff_book_evaluate/staff_book_evaluate.js"></script>	<!-- this page-->
</tag:javascript>
</html>


<!-- start:评价提示 -->
<div class="modal fade bs-example-modal-eb" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog modal-sm">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
						aria-hidden="true">×</span>
				</button>
				<h4 class="modal-title">评价图书</h4>
				<div id="borrowId" style="display:none;">${requestScope.borrow.borrowId}</div>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<div class="col-xs-10 col-sm-10 emphasis">
						<div class="ratings" id="grade">
							<a href="javascript:void(0);"><i class="fa fa-star-o"></i></a>
							<a href="javascript:void(0);"><i class="fa fa-star-o"></i></a>
							<a href="javascript:void(0);"><i class="fa fa-star-o"></i></a>
							<a href="javascript:void(0);"><i class="fa fa-star-o"></i></a>
							<a href="javascript:void(0);"><i class="fa fa-star-o"></i></a>
							<span></span>
						</div>
					</div>
				</div>
				<div class="form-group">
					<div class="col-md-11 col-sm-11 col-xs-11">
						<textarea class="resizable_textarea form-control" placeholder="简要评论一下" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 154px;"></textarea>
					</div>
				</div>
			</div>
			<div class="clearfix"></div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="button" class="btn btn-primary">确定</button>
			</div>

		</div>
	</div>
</div>
<!-- end:评价提示 -->